Micron Document
🎖️GitЯра🎖️

Node / meshtastic / Meshtastic-Android / files / core / ui / src / commonMain / kotlin / org / meshtastic / core / ui / component / EditPasswordPreference.kt

Displaying Raw • Download

core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/EditPasswordPreference.kt 520fa717a938fd84682403b41f57d9f7e1ef49ef (520fa717) Text, 3.50 KB

T8b949e/*
* Copyright (c) 2025-2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.ui.component

Tff7b72import T7ee787androidx.compose.foundation.text.KeyboardActions
Tff7b72import T7ee787androidx.compose.foundation.text.KeyboardOptions
Tff7b72import T7ee787androidx.compose.material3.Icon
Tff7b72import T7ee787androidx.compose.material3.IconButton
Tff7b72import T7ee787androidx.compose.runtime.Composable
Tff7b72import T7ee787androidx.compose.runtime.getValue
Tff7b72import T7ee787androidx.compose.runtime.mutableStateOf
Tff7b72import T7ee787androidx.compose.runtime.remember
Tff7b72import T7ee787androidx.compose.runtime.setValue
Tff7b72import T7ee787androidx.compose.ui.Modifier
Tff7b72import T7ee787androidx.compose.ui.text.input.ImeAction
Tff7b72import T7ee787androidx.compose.ui.text.input.KeyboardType
Tff7b72import T7ee787androidx.compose.ui.text.input.PasswordVisualTransformation
Tff7b72import T7ee787androidx.compose.ui.text.input.VisualTransformation
Tff7b72import T7ee787androidx.compose.ui.tooling.preview.Preview
Tff7b72import T7ee787org.jetbrains.compose.resources.stringResource
Tff7b72import T7ee787org.meshtastic.core.resources.Res
Tff7b72import T7ee787org.meshtastic.core.resources.hide_password
Tff7b72import T7ee787org.meshtastic.core.resources.show_password
Tff7b72import T7ee787org.meshtastic.core.ui.icon.MeshtasticIcons
Tff7b72import T7ee787org.meshtastic.core.ui.icon.VisibilityOff

Tf0883e@Composable
Tff7b72fun Td2a8ffEditPasswordPreferenceTb4b4b4(
Te6edf3titleTb4b4b4: Tffa657StringTb4b4b4,
Te6edf3valueTb4b4b4: Tffa657StringTb4b4b4,
Te6edf3maxSizeTb4b4b4: Tffa657IntTb4b4b4,
Te6edf3enabledTb4b4b4: Tffa657BooleanTb4b4b4,
Te6edf3keyboardActionsTb4b4b4: Te6edf3KeyboardActionsTb4b4b4,
Te6edf3onValueChangedTb4b4b4: Tb4b4b4(Tffa657StringTb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4,
Te6edf3modifierTb4b4b4: Te6edf3Modifier Tff7b72= Te6edf3ModifierTb4b4b4,
Tb4b4b4) Tb4b4b4{
Tff7b72var Te6edf3isPasswordVisible Tff7b72by Te6edf3remember Tb4b4b4{ Te6edf3mutableStateOfTb4b4b4(Tff7b72falseTb4b4b4) Tb4b4b4}

Te6edf3EditTextPreferenceTb4b4b4(
Te6edf3title Tff7b72= Te6edf3titleTb4b4b4,
Te6edf3value Tff7b72= Te6edf3valueTb4b4b4,
Te6edf3maxSize Tff7b72= Te6edf3maxSizeTb4b4b4,
Te6edf3enabled Tff7b72= Te6edf3enabledTb4b4b4,
Te6edf3isError Tff7b72= Tff7b72falseTb4b4b4,
Te6edf3keyboardOptions Tff7b72=
Te6edf3KeyboardOptionsTb4b4b4.Te6edf3DefaultTb4b4b4.Te6edf3copyTb4b4b4(Te6edf3keyboardType Tff7b72= Te6edf3KeyboardTypeTb4b4b4.Te6edf3PasswordTb4b4b4, Te6edf3imeAction Tff7b72= Te6edf3ImeActionTb4b4b4.Te6edf3DoneTb4b4b4)Tb4b4b4,
Te6edf3keyboardActions Tff7b72= Te6edf3keyboardActionsTb4b4b4,
Te6edf3onValueChanged Tff7b72= Tb4b4b4{ Te6edf3onValueChangedTb4b4b4(Tffa657itTb4b4b4) Tb4b4b4}Tb4b4b4,
Te6edf3onFocusChanged Tff7b72= Tb4b4b4{Tb4b4b4}Tb4b4b4,
Te6edf3visualTransformation Tff7b72= Tff7b72if Tb4b4b4(Te6edf3isPasswordVisibleTb4b4b4) Te6edf3VisualTransformationTb4b4b4.Te6edf3None Tff7b72else Te6edf3PasswordVisualTransformationTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3trailingIcon Tff7b72= Tb4b4b4{
Te6edf3IconButtonTb4b4b4(Te6edf3onClick Tff7b72= Tb4b4b4{ Te6edf3isPasswordVisible Tff7b72= Tff7b72!Te6edf3isPasswordVisible Tb4b4b4}Tb4b4b4) Tb4b4b4{
Te6edf3IconTb4b4b4(
Te6edf3imageVector Tff7b72=
Tff7b72if Tb4b4b4(Te6edf3isPasswordVisibleTb4b4b4) Te6edf3MeshtasticIconsTb4b4b4.Te6edf3VisibilityOff Tff7b72else Te6edf3MeshtasticIconsTb4b4b4.Te6edf3VisibilityOffTb4b4b4,
Te6edf3contentDescription Tff7b72=
Tff7b72if Tb4b4b4(Te6edf3isPasswordVisibleTb4b4b4) Tb4b4b4{
Te6edf3stringResourceTb4b4b4(Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3hide_passwordTb4b4b4)
Tb4b4b4} Tff7b72else Tb4b4b4{
Te6edf3stringResourceTb4b4b4(Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3show_passwordTb4b4b4)
Tb4b4b4}Tb4b4b4,
Tb4b4b4)
Tb4b4b4}
Tb4b4b4}Tb4b4b4,
Te6edf3modifier Tff7b72= Te6edf3modifierTb4b4b4,
Tb4b4b4)
Tb4b4b4}

Tf0883e@PreviewTb4b4b4(Te6edf3showBackground Tff7b72= Tff7b72trueTb4b4b4)
Tf0883e@Composable
Tff7b72private Tff7b72fun Td2a8ffEditPasswordPreferencePreviewTb4b4b4(Tb4b4b4) Tb4b4b4{
Te6edf3EditPasswordPreferenceTb4b4b4(
Te6edf3title Tff7b72= Ta5d6ff"Ta5d6ffPasswordTa5d6ff"Tb4b4b4,
Te6edf3value Tff7b72= Ta5d6ff"Ta5d6fftop secretTa5d6ff"Tb4b4b4,
Te6edf3maxSize Tff7b72= T79c0ff6T79c0ff3Tb4b4b4,
Te6edf3enabled Tff7b72= Tff7b72trueTb4b4b4,
Te6edf3keyboardActions Tff7b72= Te6edf3KeyboardActions Tb4b4b4{Tb4b4b4}Tb4b4b4,
Te6edf3onValueChanged Tff7b72= Tb4b4b4{Tb4b4b4}Tb4b4b4,
Tb4b4b4)
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.05s